3.4.40 \(\int \frac {\log (\frac {a (1-c)+b (1+c) x}{a+b x})}{(a-b x) (a+b x)} \, dx\) [340]

Optimal. Leaf size=27 \[ \frac {\text {Li}_2\left (\frac {c (a-b x)}{a+b x}\right )}{2 a b} \]

[Out]

1/2*polylog(2,c*(-b*x+a)/(b*x+a))/a/b

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.051, Rules used = {2565, 2352} \begin {gather*} \frac {\text {PolyLog}\left (2,\frac {c (a-b x)}{a+b x}\right )}{2 a b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Log[(a*(1 - c) + b*(1 + c)*x)/(a + b*x)]/((a - b*x)*(a + b*x)),x]

[Out]

PolyLog[2, (c*(a - b*x))/(a + b*x)]/(2*a*b)

Rule 2352

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-e^(-1))*PolyLog[2, 1 - c*x], x] /; FreeQ[{c, d, e
}, x] && EqQ[e + c*d, 0]

Rule 2565

Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*(B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m
_.)*((h_.) + (i_.)*(x_))^(q_.), x_Symbol] :> Dist[(b*c - a*d)^(q + 1)*(i/d)^q, Subst[Int[(b*f - a*g - (d*f - c
*g)*x)^m*((A + B*Log[e*x^n])^p/(b - d*x)^(m + q + 2)), x], x, (a + b*x)/(c + d*x)], x] /; FreeQ[{a, b, c, d, e
, f, g, h, i, A, B, n}, x] && NeQ[b*c - a*d, 0] && IntegersQ[m, q] && IGtQ[p, 0] && EqQ[d*h - c*i, 0]

Rubi steps

\begin {align*} \int \frac {\log \left (\frac {a (1-c)+b (1+c) x}{a+b x}\right )}{(a-b x) (a+b x)} \, dx &=\frac {\text {Subst}\left (\int \frac {\log (x)}{1-x} \, dx,x,\frac {a (1-c)+b (1+c) x}{a+b x}\right )}{2 a b}\\ &=\frac {\text {Li}_2\left (\frac {c (a-b x)}{a+b x}\right )}{2 a b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(259\) vs. \(2(27)=54\).
time = 0.08, size = 259, normalized size = 9.59 \begin {gather*} \frac {4 \tanh ^{-1}\left (\frac {b x}{a}\right ) \log \left (\frac {a}{b}+x\right )-\log ^2\left (\frac {a}{b}+x\right )-4 \tanh ^{-1}\left (\frac {b x}{a}\right ) \log \left (\frac {a-a c}{b+b c}+x\right )+2 \log \left (\frac {a}{b}+x\right ) \log \left (\frac {a-b x}{2 a}\right )-2 \log \left (\frac {a-a c}{b+b c}+x\right ) \log \left (\frac {(1+c) (a-b x)}{2 a}\right )+2 \log \left (\frac {a-a c}{b+b c}+x\right ) \log \left (\frac {(1+c) (a+b x)}{2 a c}\right )+4 \tanh ^{-1}\left (\frac {b x}{a}\right ) \log \left (\frac {a-a c+b (1+c) x}{a+b x}\right )+2 \text {Li}_2\left (\frac {a+b x}{2 a}\right )-2 \text {Li}_2\left (\frac {a-a c+b (1+c) x}{2 a}\right )+2 \text {Li}_2\left (-\frac {a-a c+b (1+c) x}{2 a c}\right )}{4 a b} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Log[(a*(1 - c) + b*(1 + c)*x)/(a + b*x)]/((a - b*x)*(a + b*x)),x]

[Out]

(4*ArcTanh[(b*x)/a]*Log[a/b + x] - Log[a/b + x]^2 - 4*ArcTanh[(b*x)/a]*Log[(a - a*c)/(b + b*c) + x] + 2*Log[a/
b + x]*Log[(a - b*x)/(2*a)] - 2*Log[(a - a*c)/(b + b*c) + x]*Log[((1 + c)*(a - b*x))/(2*a)] + 2*Log[(a - a*c)/
(b + b*c) + x]*Log[((1 + c)*(a + b*x))/(2*a*c)] + 4*ArcTanh[(b*x)/a]*Log[(a - a*c + b*(1 + c)*x)/(a + b*x)] +
2*PolyLog[2, (a + b*x)/(2*a)] - 2*PolyLog[2, (a - a*c + b*(1 + c)*x)/(2*a)] + 2*PolyLog[2, -1/2*(a - a*c + b*(
1 + c)*x)/(a*c)])/(4*a*b)

________________________________________________________________________________________

Maple [A]
time = 0.95, size = 24, normalized size = 0.89

method result size
derivativedivides \(\frac {\dilog \left (1+c -\frac {2 c a}{b x +a}\right )}{2 b a}\) \(24\)
default \(\frac {\dilog \left (1+c -\frac {2 c a}{b x +a}\right )}{2 b a}\) \(24\)
risch \(\frac {\dilog \left (1+c -\frac {2 c a}{b x +a}\right )}{2 b a}\) \(24\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln((a*(1-c)+b*(1+c)*x)/(b*x+a))/(-b*x+a)/(b*x+a),x,method=_RETURNVERBOSE)

[Out]

1/2/b/a*dilog(1+c-2*c*a/(b*x+a))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 246 vs. \(2 (26) = 52\).
time = 0.30, size = 246, normalized size = 9.11 \begin {gather*} \frac {1}{2} \, {\left (\frac {\log \left (b x + a\right )}{a b} - \frac {\log \left (b x - a\right )}{a b}\right )} \log \left (\frac {b {\left (c + 1\right )} x - a {\left (c - 1\right )}}{b x + a}\right ) + \frac {\log \left (b x + a\right )^{2} - 2 \, \log \left (b x + a\right ) \log \left (b x - a\right )}{4 \, a b} + \frac {\log \left (b x - a\right ) \log \left (\frac {b {\left (c + 1\right )} x - a {\left (c + 1\right )}}{2 \, a} + 1\right ) + {\rm Li}_2\left (-\frac {b {\left (c + 1\right )} x - a {\left (c + 1\right )}}{2 \, a}\right )}{2 \, a b} + \frac {\log \left (b x + a\right ) \log \left (-\frac {b x + a}{2 \, a} + 1\right ) + {\rm Li}_2\left (\frac {b x + a}{2 \, a}\right )}{2 \, a b} - \frac {\log \left (b x + a\right ) \log \left (-\frac {b {\left (c + 1\right )} x + a {\left (c + 1\right )}}{2 \, a c} + 1\right ) + {\rm Li}_2\left (\frac {b {\left (c + 1\right )} x + a {\left (c + 1\right )}}{2 \, a c}\right )}{2 \, a b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log((a*(1-c)+b*(1+c)*x)/(b*x+a))/(-b*x+a)/(b*x+a),x, algorithm="maxima")

[Out]

1/2*(log(b*x + a)/(a*b) - log(b*x - a)/(a*b))*log((b*(c + 1)*x - a*(c - 1))/(b*x + a)) + 1/4*(log(b*x + a)^2 -
 2*log(b*x + a)*log(b*x - a))/(a*b) + 1/2*(log(b*x - a)*log(1/2*(b*(c + 1)*x - a*(c + 1))/a + 1) + dilog(-1/2*
(b*(c + 1)*x - a*(c + 1))/a))/(a*b) + 1/2*(log(b*x + a)*log(-1/2*(b*x + a)/a + 1) + dilog(1/2*(b*x + a)/a))/(a
*b) - 1/2*(log(b*x + a)*log(-1/2*(b*(c + 1)*x + a*(c + 1))/(a*c) + 1) + dilog(1/2*(b*(c + 1)*x + a*(c + 1))/(a
*c)))/(a*b)

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 34, normalized size = 1.26 \begin {gather*} \frac {{\rm Li}_2\left (\frac {a c - {\left (b c + b\right )} x - a}{b x + a} + 1\right )}{2 \, a b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log((a*(1-c)+b*(1+c)*x)/(b*x+a))/(-b*x+a)/(b*x+a),x, algorithm="fricas")

[Out]

1/2*dilog((a*c - (b*c + b)*x - a)/(b*x + a) + 1)/(a*b)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln((a*(1-c)+b*(c+1)*x)/(b*x+a))/(-b*x+a)/(b*x+a),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log((a*(1-c)+b*(1+c)*x)/(b*x+a))/(-b*x+a)/(b*x+a),x, algorithm="giac")

[Out]

integrate(-log((b*(c + 1)*x - a*(c - 1))/(b*x + a))/((b*x + a)*(b*x - a)), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.04 \begin {gather*} \int \frac {\ln \left (-\frac {a\,\left (c-1\right )-b\,x\,\left (c+1\right )}{a+b\,x}\right )}{\left (a+b\,x\right )\,\left (a-b\,x\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(-(a*(c - 1) - b*x*(c + 1))/(a + b*x))/((a + b*x)*(a - b*x)),x)

[Out]

int(log(-(a*(c - 1) - b*x*(c + 1))/(a + b*x))/((a + b*x)*(a - b*x)), x)

________________________________________________________________________________________